<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="tb.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .content{
            width: 400px;
            height: 400px;
            border: 1px solid #000;
            margin: 20px auto;
        }
        .content .top{
            width: 100%;
            height: 50px;
            display: flex;
            text-align: center;
            line-height: 50px;

        }
        .content .top .div{
            width: 100px;
        }
        .active{
            background: #ccc;
        }
        /* .bottom{
            position: relative;
        } */

        .bottom .div1{
            width: 100%;
            height: 350px;
            text-align: center;
            line-height: 350px;
            background-color: #ccc;
            display: none;
            /* position: absolute */
        }
        .bottom .show{
            display: block;
        }
    </style>

</head>
<body>
    <div class="content" id="box">
        <div class="top">
            <div class="div">第一个</div>
            <div class="div">第二个</div>
            <div class="div">第三个</div>
            <div class="div">第四个</div>
        </div>
        <div class="bottom">
            <div class="div1 ">第一个内容</div>
            <div class="div1">第二个内容</div>
            <div class="div1">第三个内容</div>
            <div class="div1">第四个内容</div>
        </div>
    </div>
    <script>
        new Tb({
            el:'#box',
            event:'click',
            defaultIndex:0
        })
    </script>
</body>
</html>